package cn.edu.gdpt.mobile2130606012zxx0324;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {


    private EditText editTextNumber;
    private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
        button.setOnClickListener(new View.OnClickListener(){
            public void onClick(View v)
            {
                int num=Integer.parseInt(editTextNumber.getText().toString());
                Log.i("partID:","onClick:"+num);
            }
        });
    }

    private void initView() {

        editTextNumber = findViewById(R.id.editTextNumber);
        button = findViewById(R.id.button);
    }
}
